package com.ruoyi.ly.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.ly.domain.ServeExamineFlowProject;
import com.ruoyi.ly.mapper.ServeExamineFlowProjectMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ly.mapper.ServeExamineConfigMapper;
import com.ruoyi.ly.domain.ServeExamineConfig;
import com.ruoyi.ly.service.IServeExamineConfigService;

/**
 * 巡检配置Service业务层处理
 * 
 * @author wj
 * @date 2024-01-10
 */
@Service
public class ServeExamineConfigServiceImpl implements IServeExamineConfigService
{
    @Autowired
    private ServeExamineConfigMapper serveExamineConfigMapper;

    @Autowired
    private ServeExamineFlowProjectMapper serveExamineFlowProjectMapper;

    /**
     * 查询巡检配置
     * 
     * @param examineConfigId 巡检配置主键
     * @return 巡检配置
     */
    @Override
    public ServeExamineConfig selectServeExamineConfigByExamineConfigId(Long examineConfigId)
    {
        return serveExamineConfigMapper.selectServeExamineConfigByExamineConfigId(examineConfigId);
    }

    /**
     * 查询巡检配置列表
     * 
     * @param serveExamineConfig 巡检配置
     * @return 巡检配置
     */
    @Override
    public List<ServeExamineConfig> selectServeExamineConfigList(ServeExamineConfig serveExamineConfig)
    {
        return serveExamineConfigMapper.selectServeExamineConfigList(serveExamineConfig);
    }

    /**
     * 新增巡检配置
     * 
     * @param serveExamineConfig 巡检配置
     * @return 结果
     */
    @Override
    public int insertServeExamineConfig(ServeExamineConfig serveExamineConfig)
    {
        serveExamineConfig.setCreateTime(DateUtils.getNowDate());
        return serveExamineConfigMapper.insertServeExamineConfig(serveExamineConfig);
    }

    /**
     * 修改巡检配置
     * 
     * @param serveExamineConfig 巡检配置
     * @return 结果
     */
    @Override
    public int updateServeExamineConfig(ServeExamineConfig serveExamineConfig)
    {
        return serveExamineConfigMapper.updateServeExamineConfig(serveExamineConfig);
    }

    /**
     * 批量删除巡检配置
     * 
     * @param examineConfigIds 需要删除的巡检配置主键
     * @return 结果
     */
    @Override
    public int deleteServeExamineConfigByExamineConfigIds(Long[] examineConfigIds)
    {
        return serveExamineConfigMapper.deleteServeExamineConfigByExamineConfigIds(examineConfigIds);
    }

    /**
     * 删除巡检配置信息
     * 
     * @param examineConfigId 巡检配置主键
     * @return 结果
     */
    @Override
    public int deleteServeExamineConfigByExamineConfigId(Long examineConfigId)
    {
        return serveExamineConfigMapper.deleteServeExamineConfigByExamineConfigId(examineConfigId);
    }


}
